<template>
  <div>
    <el-button type="primary" @click="goto({ path: '/backtopone' })"
      >跳到组件backtopOne</el-button
    >
    <el-button type="primary" @click="goto({ path: '/backtoptwo' })"
      >跳到组件backtopTwo</el-button
    >
    <div>
      <p>input搜索框</p>
      <input-search :restaurants="restaurants" />
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      restaurants: [
        { value: "三全鲜食（北新泾店）", address: "长宁区新渔路144号" },
        {
          value: "三全dfsfsdf鲜食（北新泾店safsfsd）",
          address: "上海市长宁区淞虹路661号"
        },
        {
          value: "三全哈哈鲜食（北新泾店safsfsd）",
          address: "上海市普陀区真北路988号创邑金沙谷6号楼113"
        },
        { value: "泷千家(天山西路店)", address: "天山西路438号" }
      ]
    };
  },
  methods: {
    goto(path) {
      this.$router.push(path);
    },
    handleSelect(value) {
      console.log(value);
    }
  }
};
</script>
<style></style>
